package cn.liujianbo.example.validate.runner;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

/**
 * @author 刘建波
 * @date 2021-09-07 21:45
 *
 * 有多个runner  @Order 指定顺序
 */
@Component
@Order(1)
public class TestApplicationRunner implements ApplicationRunner {
    @Autowired
    private TestRunnerService testRunnerService;
    @Override
    public void run(ApplicationArguments args) throws Exception {
        testRunnerService.systemInit();
    }
}
